const mongoose = require('mongoose')
const menuSchema = mongoose.Schema({
    parentId: [mongoose.Types.ObjectId], // 父菜单Id
    menuType: Number,//菜单类型 1 菜单 2 按钮
    menuName: String,//菜单名称
    menuCode: String,//权限标识
    path: String,//路由地址
    icon: String,//图标
    component: String,//组件地址
    menuState: Number,//菜单状态 0 停用 1 启用
    "createTime": {
        type: Date,
        default: Date.now()
    },
    "updateTime": {
        type: Date,
        default: Date.now()
    },
})

module.exports = mongoose.model("menu", menuSchema, "menu")
